package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Comment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    /*@Select("select " +
            "comment_id AS id," +
            "comment_content AS con," +
            "commentator_id AS cid," +
            "article_id AS aid " +
            "from comment " +
            "where commentator_id=#{cid}")
    public List<Comment> selectByCid(int cid);
    @Select("select " +
            "comment_id as id," +
            "comment_content as con," +
            "commentator_id as cid," +
            "article_id as aid " +
            "from comment " +
            "where article_id=#{aid}")
    public List<Comment> selectByAid(int aid);
    @Delete("delete " +
            "from comment " +
            "where article_id=#{aid}")
    public int deleteByAid(int aid);*/
}